package question4;

public class Test {
    public static void main(String[] args) {
        Animal animal=new Cat();
        animal.eat();//非静态，编译看右边，用子类的
       // ((Cat) animal).catchMouse();
        if (animal instanceof Cat){
            Cat c=(Cat)animal;
            c.catchMouse();
            c.eat();
        }
    }
}
